import Vue from 'vue'
import Router from 'vue-router'
import Dashboard from '@/components/Dashboard'
import DeviceList from '@/components/DeviceList'
import DeviceEdit from '@/components/DeviceEdit'
import Monitor from '@/components/Monitor'
import UserEdit from '@/components/UserEdit'
import UserProfile from '@/components/UserProfile'
import UserList from '@/components/UserList'
import YSJLogList from '@/components/YSJLogList'
import Typography from '@/components/Typography'
import Icons from '@/components/Icons'
import Maps from '@/components/Maps'
import Notifications from '@/components/Notifications'

// GeneralViews
import NotFound from '@/components/GeneralViews/NotFound.vue'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: '概览',
      component: Dashboard
    },
    {
      path: '/users',
      name: '用户',
      component: UserList
    },
    {
      path: '/users/edit/:id',
      name: '编辑用户',
      component: UserEdit
    },
    {
      path: '/users/add',
      name: '新增用户',
      component: UserEdit
    },
    {
      path: '/users/id/:id',
      name: '用户资料',
      component: UserProfile
    },
    {
      path: '/monitor',
      name: '监控',
      component: Monitor
    },
    {
      path: '/devices',
      name: '设备',
      component: DeviceList
    },
    {
      path: '/devices/add',
      name: '新增设备',
      component: DeviceEdit
    },
    {
      path: '/logs',
      name: '日志',
      component: YSJLogList
    },
    {
      path: '/typography',
      name: '帮助',
      component: Typography
    },
    {
      path: '/icons',
      name: '图标',
      component: Icons
    },
    {
      path: '/maps',
      name: '地图',
      component: Maps
    },
    {
      path: '/notifications',
      name: '通知',
      component: Notifications
    },
    { path: '*', component: NotFound }
  ],
  linkActiveClass: 'active'
})
